package xtable;

// typed table access point
public class Localids {
	Localids() {
	}

	public static void firstInsert(Integer key, xbean.ServerId value) throws Exception {
		_Tables_.getInstance().localids.firstInsert(key, value);
	}

	public static xbean.ServerId get(Integer key) throws Exception {
		return _Tables_.getInstance().localids.get(key);
	}

	public static xbean.ServerId get(Integer key, xbean.ServerId value) throws Exception {
		return _Tables_.getInstance().localids.get(key, value);
	}

	public static void insert(Integer key, xbean.ServerId value) throws Exception {
		_Tables_.getInstance().localids.insert(key, value);
	}

	public static void delete(Integer key) throws Exception {
		_Tables_.getInstance().localids.delete(key);
	}

	public static boolean add(Integer key, xbean.ServerId value) throws Exception {
		return _Tables_.getInstance().localids.add(key, value);
	}

	public static boolean remove(Integer key) throws Exception {
		return _Tables_.getInstance().localids.remove(key);
	}

	public static xdb.TTableCache<Integer, xbean.ServerId> getCache() {
		return _Tables_.getInstance().localids.getCache();
	}

	public static xdb.TTable<Integer, xbean.ServerId> getTable() {
		return _Tables_.getInstance().localids;
	}

	public static xbean.ServerId select(Integer key) throws Exception {
		return getTable().select(key, new xdb.TField<xbean.ServerId, xbean.ServerId>() {
			public xbean.ServerId get(xbean.ServerId v) {
				return v.toData();
			}
		});
	}

	public static xbean.ServerId selectWithoutCache(Integer key) throws Exception {
		return getTable().selectWithoutCache(key, new xdb.TField<xbean.ServerId, xbean.ServerId>() {
			public xbean.ServerId get(xbean.ServerId v) {
				return v.toData();
			}
		});
	}

	public static xbean.ServerId selectWithoutCache4Rollback(Integer key) throws Exception {
		return getTable().selectWithoutCache4Rollback(key, new xdb.TField<xbean.ServerId, xbean.ServerId>() {
			public xbean.ServerId get(xbean.ServerId v) {
				return v.toData();
			}
		});
	}

	public static java.util.List<Integer> selectSid(Integer key) throws Exception {
		return getTable().select(key, new xdb.TField<xbean.ServerId, java.util.List<Integer>>() {
				public java.util.List<Integer> get(xbean.ServerId v) {
					return v.getSidAsData();
				}
			});
	}

}
